<template>
	<div class="CHeadIcon" :style="{'width':width + 'px', 'height':height + 'px'}">
		<p 
			class="headIcon"
			v-text="letter" 
			:class="{'radius': radius}"
			:style="{'line-height': height + 'px', 
			'font-size': fontsize + 'px'}">
		</p>
		<p 
			class="headIcon2"
			:class="{'radius': radius}"
			:style="{'background-image':'url(' + icon + ')', 
			'line-height': height + 'px', 
			'font-size': fontsize + 'px'}">
		</p>
	</div>
</template>

<script>
	export default {
		name: 'CHeadIcon',
		data() {
			return {
			}
		},
		props: ['icon', 'letter', 'gender', 'width', 'height', 'fontsize', 'radius']
	}
</script>

<style scoped>
	.CHeadIcon {
		position: relative;
		width: 80px;
		height: 80px;
	}
	
	.headIcon {
		background-size: 100% 100%;
		background-color: #666;
		font-size: 30px;
		color: #FFF;
		text-align: center;
		line-height: 80px;
		width: 100%;
		height: 100%;
	}
	
	.radius {
		border-radius: 15%;
		-webkit-border-radius: 15%;
		-moz-border-radius: 15%;
	}
	
	.headIcon2 {
		position: absolute;
		top: 0px;
		left: 0px;
		background-size: 100% 100%;
		font-size: 30px;
		color: #FFF;
		text-align: center;
		line-height: 80px;
		width: 100%;
		height: 100%;
	}
</style>